package com.handinglian.ai.common.shiro;

import com.handinglian.ai.system.entity.UserInfo;

import java.io.Serializable;

/**
 * 授权用户信息
 */
public class Principal implements Serializable {
    private Integer userId;
    private String account;

    public Principal(UserInfo user) {
        this.userId = user.getId();
        this.account = user.getAccount();
    }

    public Integer getUserId() {
        return userId;
    }

    public String getAccount() {
        return account;
    }

    @Override
    public String toString() {
        return "Principal{" +
                "userId=" + userId +
                ", account='" + account + '\'' +
                '}';
    }
}
